#include "VampireBat.h"


VampireBat::VampireBat(void): DynamicObject()
{
}

VampireBat::VampireBat(float _x, float _y): DynamicObject(_x, _y, -0.2f, 0, EnumID::VampireBat_ID)
{
}

VampireBat::~VampireBat(void)
{
}

void VampireBat::MoveSinPath(int deltaTime)
{
	float nextX = vX * deltaTime + posX;
	float nextY = 4 * sin(nextX/10);
	vY = nextY;
	posX += vX * deltaTime;
	posY += vY;
}

void VampireBat::Update(int deltaTime)
{
	//if(posX > 0)
	//{
	//	posX += vX*deltaTime;
	//}
	//posY += vY*deltaTime;
	MoveSinPath(deltaTime);
	sprite->Update(deltaTime);
}